import { Component, OnInit } from '@angular/core';
import {TeacherService} from "../teacher/teacher.service";

@Component({
  selector: 'app-title',
  templateUrl: './title.component.html',
  styleUrls: ['./title.component.less']
})
export class TitleComponent implements OnInit {

  who = "谁？";

  constructor( private teacherService: TeacherService) {
    teacherService.who.subscribe(value => this.who = value);
    teacherService.whoErr.subscribe(value => this.who = value);
  }

  ngOnInit() {
  }

}
